﻿using CoreShop.Library;
using CoreShop.Model;
using Sunny.UI;
using Sunny.UI.Win32;

namespace CoreShop.App
{
    public partial class UIMemberMenu : UIDropDownItem
    {
        public corecmsuser member = null;
        public UIMemberMenu(corecmsuser _member)
        {
            member = _member;
            InitializeComponent();
            if (member != null)
            {
                if (member.gsPosVip.status == (int)GlobalEnumVars.MemberCardStatus.Loss)
                    btnCardLoss.Visible = false;
                else btnCardUsed.Visible = false;
                if (string.IsNullOrEmpty(member.cardId)) btnSendCard.Visible = true;
            }
        }

        private void btnTableMerge_Click(object sender, System.EventArgs e)
        {
            UIButton btn = (UIButton)sender;
            Close();
            DoValueChanged(sender, btn.Tag);
        }
    }

}
